<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="<c:url value='/css/style.css'/>" rel="stylesheet" type="text/css"/>
<fmt:setBundle basename="messages" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Public Holiday Listing</title>
</head>
<body>	
        <fmt:message key="label.holiday"/>
        <c:url var="url" scope="page" value="/CreatePublicHoliday.jsp">        		
                <c:param name="name" value=""/>
                <c:param name="date" value=""/>                           
                <c:param name="insert" value="true"/>
        </c:url>
        <a href="${url}">Add</a>
        <br/><br/>
        <table class="borderAll">
            <tr>
            	<th>Holiday Name</th>
                <th>Holiday Date</th>                
                <th>Edit Delete</th>
            </tr>
            <c:forEach var="holiday" items="${holiday}" varStatus="idx">
                <tr>                                        
                    <td class="nowrap">${holiday.name}</td>                    
                    <td class="nowrap">${holiday.date}</td>                    
                    <td class="nowrap">
                        <c:url var="updurl" scope="page" value="/CreatePublicHoliday.jsp">                            
                            <c:param name="name" value="${holiday.name}"/>
			                <c:param name="date" value="${holiday.date}"/>			                                                 
                             <c:param name="update" value="true"/>
                        </c:url>
                        <a href="${updurl}">Edit</a>
                        &nbsp;&nbsp;&nbsp;
                        <c:url var="delurl" scope="page" value="/delete">
                            <c:param name="name" value="${holiday.name}"/>                            
                        </c:url>
                        <a href="${delurl}">Delete</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
</body>
</html>